package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.Hotel;

public class HotelStarRatingComparatorAscending implements Comparator<Hotel> {
	
	private static HotelStarRatingComparatorAscending hotelStarRatingComparatorAscending = new HotelStarRatingComparatorAscending();

	@Override
	public int compare(Hotel hotel1, Hotel hotel2) {
		return hotel1.getStarRating()-hotel2.getStarRating();
	}
	
	private HotelStarRatingComparatorAscending(){
		
	}
	
	public static HotelStarRatingComparatorAscending getInstance(){
		return hotelStarRatingComparatorAscending;
	}	

}
